// JavaScript Document
var ThinkAPK = {};
(function(){
	//域名
	//ThinkAPK.Domain = {static: 'http://static.thinkapk.com/', web: 'http://www.thinkapk.com/', news: 'http://android.thinkapk.com/'};
	ThinkAPK.Domain = {static: 'http://localhost:81/', web: 'http://localhost/', news: 'http://localhost:83/'};
	//推荐应用加载
	ThinkAPK.LoadAppHover = function(div, url){
		$(div).hover(
			function(){
				var id = ($(this).attr('id'));
				id = id.split('-');
				if(id[2]=='undefinded' || id[2]==undefined || id[2]<=0) return;
				var appId = id[2];
				$.ajax({
					url: url,
					dataType:'json',
					data:{id: appId},
					success:function(d){
						$('#app-box-'+appId).html(d.content);	
					}
				});
			},
			function(){
				return;
			}
		);
	};
	//网站广告位
	ThinkAPK.AD = function(name){
		if(!name) return;
		document.writeln('<script src="'+ThinkAPK.Domain.static+'scripts/'+name+'.js" type="text/javascript"></script>');
		return;
	};
	//搜索处理
	ThinkAPK.SearchForm = function(){
		if(!$.trim($('#search-keyword').val())){
			alert('请输入搜索关键词！');
			return false;
		}
	};
})();

